package com.moli.iov.base.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moli.iov.base.model.dto.req.QueryVehicleTboxListParamDto;
import com.moli.iov.base.model.dto.req.VehicleTboxReqDto;
import com.moli.iov.base.model.po.VehicleTbox;
import com.moli.iov.rest.RestResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wanghualin
 * @since 2019-09-02
 */
public interface IVehicleTboxService extends IService<VehicleTbox> {

  /**
   * saveVehicleTbox  不添加vin
   */
  public RestResponse saveVehicleTbox(VehicleTboxReqDto vehicleTboxReqDto);

  /**
   * updateVehicleTbox
   */
  public boolean updateVehicleTbox(VehicleTbox oldVehicleTbox,VehicleTbox updateVehicleTbox);

  /**
   * getVehicleTboxByVin
   */
  public VehicleTbox getVehicleTboxByVin(String vin);

  /**
   * getVehicleTboxByDeviceId
   */
  public VehicleTbox getVehicleTboxByDeviceId(String deviceId);

  /**
   * TBOX管理查询页
   */
  public IPage<VehicleTbox> listVehicleTboxs(
      QueryVehicleTboxListParamDto queryParam);

  /**
   * 得到所有vin不为空的VehicleTbox集合
   * @return
   */
  List<VehicleTbox> listVehicleTbox();
  /**
   *
   * 得到所有vin不为空的VehicleTboxMap
   *
   */
  public Map<String, String> listVehicleTboxMap();

  /**
   * 得到所有Tbox  生产厂商+终端型号 Map
   * @return
   */
  public Map<String, String> listVehicleTboxModelMap();

  /**
   * 根据simNo 找到绑定的车辆
   * @param simNo
   * @return
   */
  VehicleTbox getVehicleTboxBySimNo(String simNo);

  /**
   * 初始化数据
   */
  void initVehicleTbox();

  /**
   *
   * @param vinList
   * @return
   */
  List<VehicleTbox> listVehicleTboxList(List<String> vinList);

  /**
   * 返回已绑定所有tbox
   * @return
   */
  RestResponse queryVehicleTboxCount();

  /**
   * 3.10
   * 设备管理> 终端安装管理-有效授权列表
   * @param queryParam
   * @return
   */
  IPage<VehicleTbox> listVehicleTboxBinding(QueryVehicleTboxListParamDto queryParam);

  /**
   * 返回已绑定tbox
   * @param iccid
   * @return
   */
  VehicleTbox getVehicleTboxByIccid(String iccid);
}
